function [ A ] = generate_hyperbolic( Nx, Ny, coeff_x, coeff_y )
%UNTITLED2 Summary of this function goes here
%   Detailed explanation goes here


A = zeros(Nx*Ny,Nx*Ny);
% Inner points
for j=2:Nx-1
    for i=2:Ny-1
        index = (j-1)*Ny+i;
        A(index, index-1)= -coeff_y;
        A(index,index+1) = coeff_y;
        A(index, index+Ny) = coeff_x;
        A(index,index-Ny) = -coeff_x ;
    end
end

% East and West Boundary
for i=2:Ny-1
    j=1;
    index = (j-1)*Ny+i;
    A(index, index-1)= -coeff_y;
    A(index,index+1) = coeff_y;
    A(index, index+Ny) = coeff_x;
    A(index,(Nx-1)*Ny+i) = -coeff_x ;
    
    j=Nx;
    index = (j-1)*Ny+i;
    A(index, index-1)= -coeff_y;
    A(index,index+1) = coeff_y;
    A(index, i) = coeff_x;
    A(index,index-Ny) = -coeff_x ;
end

% SW Corner point
i=1;
j=1;
index = (j-1)*Ny+i;
A(index, index+Ny-1)= -coeff_y;
A(index,index+1) = coeff_y;
A(index, index+Ny) = coeff_x;
A(index,(Nx-1)*Ny+i) = -coeff_x ;

% SE Corner Point
j=Nx;
index = (j-1)*Ny+i;
A(index, index+Ny-1)= -coeff_y;
A(index,index+1) = coeff_y;
A(index, i) = coeff_x;
A(index,index-Ny) = -coeff_x;



% North and South Boundary
for j=2:Nx-1
    i=1;
    index = (j-1)*Ny+i;
    A(index, index+Ny-1)= -coeff_y;
    A(index,index+1) = coeff_y;
    A(index, index+Ny) = coeff_x;
    A(index,index-Ny) = -coeff_x;
    
    i=Ny;
    index = (j-1)*Ny+i;
    A(index, index-1)= -coeff_y;
    A(index,index-Ny+1) = coeff_y;
    A(index, index+Ny) = coeff_x;
    A(index,index-Ny) = -coeff_x ;
end

% NW Corner Point
i=Ny;
j=1;
index = (j-1)*Ny+i;
A(index, index-1)= -coeff_y;
A(index,index-Ny+1) = coeff_y;
A(index, index+Ny) = coeff_x;
A(index,(Nx-1)*Ny+i) = -coeff_x ;

% NE Corner Point

i=Ny;
j=Nx;
index = (j-1)*Ny+i;
A(index, index-1)= -coeff_y;
A(index,index-Ny+1) = coeff_y;
A(index, i) = coeff_x;
A(index,index-Ny) = -coeff_x ;
end

